<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="/header.jsp" %>

<!--图片轮播区-->
<div class="row">
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
        <!-- Indicators -->
        <ol class="carousel-indicators">
            <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
            <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        </ol>

        <!-- Wrapper for slides -->
        <div class="carousel-inner" role="listbox">
            <div class="item active">
                <img src="${pageContext.request.contextPath}/images/adver/1.jpg" alt="...">
                <div class="carousel-caption">
                    ...
                </div>
            </div>

            <div class="item">
                <img src="${pageContext.request.contextPath}/images/adver/2.jpg" alt="...">
                <div class="carousel-caption">
                    ...
                </div>
            </div>
        </div>

        <!-- Controls -->
        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
</div>


<!--今日推荐-->
<div class="row">

    <div class="col-md-2 column ">
        <div class="thumbnail today-style">
            <div class="caption">
                <h3 style="margin-top:30px;">今日推荐</h3>
            </div>
            <div style="margin-top:10px; margin-bottom:4px">
                <img src="${pageContext.request.contextPath}/images/goods/2016.png">
            </div>
        </div>
    </div>

    <c:forEach items="${todays}" var="today">
        <div class="col-md-2">
            <a href="${pageContext.request.contextPath}/goods/goodsDetail.action?goods_id=${today.goodsId}">
                <div class="thumbnail homegoods">
                    <img alt="暂无图片" src="${pageContext.request.contextPath}${today.goodsPic}">
                    <div class="caption caption-style">
                        <p> ${today.goodsName}</p>
                        <p class="font-red">
                            ￥ ${today.goodsPrice}
                        </p>
                    </div>
                </div>
            </a>
        </div>
    </c:forEach>
</div>

<!---按照大类展示商品-->
<c:forEach items="${categoryAndGoods}" var="categoryAndGoods">
    <div class="row">
        <div class="col-md-12">
            <div class="navtitle">
                <span class="cate-title">${categoryAndGoods.parents.cateName}</span>
                <small>${categoryAndGoods.parents.cateDesc}</small>
                <a class="btn btn-default pull-right" role="button">更多${categoryAndGoods.parents.cateName}</a>
                <ul class="list-inline pull-right cate-ul">
                    <c:forEach items="${categoryAndGoods.child}" var="ch">
                        <li><a href="#">${ch.cateName} </a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>

        <c:forEach items="${categoryAndGoods.goods}" var="good">
            <div class="col-md-2">
                <a href="${pageContext.request.contextPath}/goods/goodsDetail.action?goods_id=${good.goodsId}">
                    <div class="thumbnail homegoods">
                        <img alt="暂无图片" src="${pageContext.request.contextPath}${good.goodsPic}">
                        <div class="caption caption-style">
                            <p> ${good.goodsName}</p>
                            <p class="font-red">
                                ￥ ${good.goodsPrice}
                            </p>
                        </div>
                    </div>
                </a>
            </div>
        </c:forEach>
    </div>
</c:forEach>

<!--热销商品-->
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">热销商品</h3>
            </div>
            <div class="panel-body">
                <c:forEach items="${hotGoods}" var="good">
                    <div class="col-md-2">
                        <a href="${pageContext.request.contextPath}/goods/goodsDetail.action?goods_id=${good.goodsId}">
                            <div class="thumbnail homegoods">
                                <img alt="暂无图片" src="${pageContext.request.contextPath}${good.goodsPic}">
                                <div class="caption caption-style">
                                    <p> ${good.goodsName}</p>
                                    <p class="font-red">
                                        ￥ ${good.goodsPrice}
                                    </p>
                                </div>
                            </div>
                        </a>
                    </div>
                </c:forEach>
            </div>
        </div>
    </div>
</div>

<!-- col-12 end -->
</div>
<!-- row end -->
</div>
<%@include file="/footer.jsp" %>


